<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>发货单</title>
<link type="text/css" href="/css/gm.css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="/js/coo.js"></script>
<link type="text/css" href="/css/datepicker.css" rel="stylesheet">
<link rel="stylesheet" href="/css/ace/assets/css/bootstrap.css" />
<link type="text/css" href="/css/print.css" rel="stylesheet">
</head>

<body style="background:rgb(244, 244, 244);">
<div class="print">
	<div class='print-btn btn   btn-lg' id="printbtn"> <a href="javascript:void(0);" class="btn">打印<span class="glyphicon glyphicon-print"></span> </a> </div>
</div>
<div class="printarea p" id="printarea">
	<h3> 商富商城 发货单 </h3>
	<table class="table1">
		<tr>
			<td >收货人：{$row->name}</td>
			<td>电话：{$row->mobile}</td>
			<td></td>
		</tr>
		<tr>
			<td colspan="3">地址：{$row->province} {$row->city} {$row->district} {$row->address}</td>
		</tr>
		<tr>
			<td>订单号：{$row->order_sn}</td>
			<td>下单时间：{$row->add_time|truncate|date_format:"%Y%m%d"}</td>
			<td></td>
		</tr>
	</table>
	<div class="orderprint">
		<table class="table2" rules ='rows'>
			<thead>
				<tr class='tr'>
					<th>序号</th>
					<th>商品名称</th>
					<th>单价({if $row->integral_order==1}积分{else}元{/if})</th>
					<th>数量</th>
					<th>小计({if $row->integral_order==1}积分{else}元{/if})</th>
				</tr>
			</thead>
			<tbody>
			
			{foreach from=$goods item=g}
			<tr>
				<td>{$g->sort}</td>
				<td>{$g->goods_name} {$g->spec}</td>
				<td>{if $row->integral_order==1}{intval($g->price)}{else}&yen;{$g->price}{/if}</td>
				<td>{$g->quantity}</td>
				<td>{if $row->integral_order==1}{intval($g->price * $g->quantity)}{else}&yen;{$g->price * $g->quantity}{/if}</td>
			</tr>
			{/foreach}
			<tr>
				<th></th>
				<th colspan="2" class="tl">合计</th>
				<th>{$total}</th>
				<th>{if $row->integral_order==1}{intval($row->total_price)}{else}&yen;{$row->total_price}{/if}</th>
			</tr>
			</tbody>
			
			<tfoot>
				<tr>
					<th colspan="10" class='bot'><span>总计：{if $row->integral_order==1}{intval($row->total_price)}{else}&yen;{$row->total_price}{/if}</span><span>运费：&yen;{$row->shipping_price}</span><span>优惠：&yen;{$row->discount_price}</span><span>{if $row->integral_order==1}订单总积分：{intval($row->total_price - $row->discount_price)}{else}订单总额：&yen;{$row->total_price - $row->discount_price}{/if}</span><span>店铺：{$goods[0]->shop_name}</span> </th>
				</tr>
			</tfoot>
		</table>
		<p style="text-align:left;"><span style=" display:inline-block;width:80mm;text-align:left;color: #333;">快递公司：{$row->shipping_company}</span><span style="color: #333;">快递单号：{$row->shipping_number}</span></p>
	</div>
</div>
</body>
</html>
<script>
$(function(){
	$("#printbtn").click(function(){
		$('.print-btn').hide();
		$('.printarea').removeClass('p');
		window.print();
	});
});
</script>
